import axios from 'axios';

//创建axios实例
export const Service = axios.create({
  baseURL: 'http://localhost:8080',
  headers:{
    'Content-Type': "application/json;charset=UTF-8"
  },
  timeout:3000
});

export const employeePageList = (payload)=>{
    return Service.get('/employee/page', {params: payload})
}

export const addEmployeeList = (from)=>{
    return Service.post('/employee/add', from)
}

export const selectList = (id)=>{
    return Service.get('/employee/employeeList', {params: { id }})
}

export const updateEmployee = (form)=>{
    return Service.put('/employee/update', form)
}

export const deleteEmployee = (id)=>{
    return Service.delete('/employee/delete/{id}', {params: { id }})
}